package com.gosling.cloudspace.common.constants;

import io.swagger.annotations.ApiModelProperty;
import org.apache.poi.poifs.filesystem.FileMagic;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * elasticsearch
 *
 * @email 1793327033@qq.com
 * @classname CommonConstants
 * @author: osc_lihonglin
 * @date: 2021/6/23 22:07
 */
public class CommonConstants {
    public static final Integer YES = 1;
    public static final Integer NO = 0;
    public static final String SUCESS = "sucess";
    public static final String ERROR = "error";
    public static final String FAIL = "fail";
    public static final String create = "CREATE";
    public static final String update = "UPDATE";
    public static final String TRACE_ID = "traceId";

    @ApiModelProperty("对日还款")
    public static final String REPAY_DAY_FORDAY = "unfixed";
    @ApiModelProperty("固定还款日")
    public static final String REPAY_DAY_FIXDAY = "fixed";

    //罚息主体为---current_principal-当期本金,residue_principal-剩余本金
    @ApiModelProperty(name = "curr_principal-当期本金", value = "redis-key:punishObject")
    public static final String PUNISH_SUB_CURR = "current_principal";
    @ApiModelProperty("surp_principal-剩余本金")
    public static final String PUNISH_SUB_SURP = "residue_principal";
    private static final String[] PUNISH_SUB_S = {PUNISH_SUB_CURR, PUNISH_SUB_SURP};
    public static final List<String> PUNISH_SUB_LIST = new ArrayList<>(Arrays.asList(PUNISH_SUB_S));

    //通用友善提示语
    public static final String FRIENDLY_TIPS = "非常抱歉，服务器暂时无法响应您的请求，请稍后再次尝试操作。";
    //AES加密密钥   不可修改 /这里不配置到配置中心的原因:这个密钥涉及到整个系统的隐私数据加解密,如果不小心改动,会导致整个系统加解密混乱/
    public static final String AES_SECRET_KEY = "W1CPIxKhJfasyMxA";

    /*** 微信响应参数 **/
    public static final String LOCALHOST_IP = "127.0.0.1";
    public static final String WXPAY_MSG_DEFAULT = "DEFAULT";
    public static final String WXPAY_MSG_SUCCESS = "SUCCESS";
    public static final String WXPAY_MSG_ERROR = "ERROR";
    public static final String WXPAY_CODE_SUCCESS = "0000";
    public static final String WXPAY_CODE_ERROR = "1000";
    public static final String WXPAY_CODE_DEFAULT = "1111";

    /**
     * 图片后缀
     **/
    public final static List IMAGE = Arrays.asList("JPEG", "PNG", "JPG");
    /**
     * 图片后缀FileMagic枚举类
     **/
    public final static List IMAGE_FILE_MAGIC = Arrays.asList(FileMagic.PNG, FileMagic.JPEG);
}
